Adwaita: GtkSwitch in selected list rows
authorLapo Calamandrei <calamandrei@gmail.com>
Tue, 22 Jul 2014 08:29:01 +0000 (10:29 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Tue, 22 Jul 2014 08:29:01 +0000 (10:29 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 163ba46e262aa4f12a9eb38adad73ef4fa6a5654..29ef886eaac965779915edc07a185245c9870793 100644 (file)
@@ -1518,7 +1518,12 @@ GtkSwitch {
       }
     }
   }
-  &.slider {
+  .list-row:selected & {
+    box-shadow: 0 0 0 1px $selected_fg_color;
+    &:backdrop { box-shadow: 0 0 0 1px $backdrop_base_color; }
+  }
+  &.slider,
+  .list-row:selected &.slider {
     border-radius: 3px;
     @include button(normal, $noedge: true);
     box-shadow: inset 0 1px if($variant=='light', white,
index bcfcea9b27bf2d7b276ad2f65f66f7afd3429d6e..88e428d8ba64e297607ff1f87aa3bfbfc81bc672 100644 (file)
@@ -1606,7 +1606,11 @@ GtkSwitch {
         color: #454c4c;
         border-color: #1e2222;
         background-color: #323636; }
-  GtkSwitch.slider {
+  .list-row:selected GtkSwitch {
+    box-shadow: 0 0 0 1px white; }
+    .list-row:selected GtkSwitch:backdrop {
+      box-shadow: 0 0 0 1px #2c2c2c; }
+  GtkSwitch.slider, .list-row:selected GtkSwitch.slider {
     border-radius: 3px;
     border-style: solid;
     border-width: 1px;
@@ -1617,7 +1621,7 @@ GtkSwitch {
     icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
     box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px #2a2f2f; }
-    GtkSwitch.slider:hover {
+    GtkSwitch.slider:hover, .list-row:selected GtkSwitch.slider:hover {
       border-style: solid;
       color: #eeeeec;
       border-color: #1c1f1f;
@@ -1626,9 +1630,9 @@ GtkSwitch {
       icon-shadow: 0 -1px rgba(0, 0, 0, 0.77976);
       box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
       box-shadow: inset 0 1px rgba(255, 255, 255, 0.15), inset 0 -2px rgba(57, 63, 63, 0.6), inset 0 -1px #2a2f2f; }
-    GtkSwitch.slider:active {
+    GtkSwitch.slider:active, .list-row:selected GtkSwitch.slider:active {
       border: 1px solid #0f2b48; }
-    GtkSwitch.slider:insensitive {
+    GtkSwitch.slider:insensitive, .list-row:selected GtkSwitch.slider:insensitive {
       border-style: solid;
       color: #939695;
       border-color: #1c1f1f;
@@ -1636,7 +1640,7 @@ GtkSwitch {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
-    GtkSwitch.slider:backdrop {
+    GtkSwitch.slider:backdrop, .list-row:selected GtkSwitch.slider:backdrop {
       border-style: solid;
       color: #c9cbc9;
       border-color: #1e2222;
@@ -1644,9 +1648,9 @@ GtkSwitch {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
-      GtkSwitch.slider:backdrop:active {
+      GtkSwitch.slider:backdrop:active, .list-row:selected GtkSwitch.slider:backdrop:active {
         border-color: #215d9c; }
-      GtkSwitch.slider:backdrop:insensitive {
+      GtkSwitch.slider:backdrop:insensitive, .list-row:selected GtkSwitch.slider:backdrop:insensitive {
         border-style: solid;
         color: #454c4c;
         border-color: #1e2222;
index ca9396ffd6cb31fd83b2dbb657a6365886365ef6..5e6dc6aab274ec8b09c2f5433007f0d05fab1fa3 100644 (file)
@@ -1600,7 +1600,11 @@ GtkSwitch {
         color: #c7c7c7;
         border-color: #a8a8a8;
         background-color: #f4f4f4; }
-  GtkSwitch.slider {
+  .list-row:selected GtkSwitch {
+    box-shadow: 0 0 0 1px white; }
+    .list-row:selected GtkSwitch:backdrop {
+      box-shadow: 0 0 0 1px #fcfcfc; }
+  GtkSwitch.slider, .list-row:selected GtkSwitch.slider {
     border-radius: 3px;
     border-style: solid;
     border-width: 1px;
@@ -1611,7 +1615,7 @@ GtkSwitch {
     icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
     box-shadow: inset 0 1px white;
     box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
-    GtkSwitch.slider:hover {
+    GtkSwitch.slider:hover, .list-row:selected GtkSwitch.slider:hover {
       border-style: solid;
       color: #2e3436;
       border-color: #a1a1a1;
@@ -1620,9 +1624,9 @@ GtkSwitch {
       icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
       box-shadow: inset 0 1px white;
       box-shadow: inset 0 1px white, inset 0 -2px rgba(237, 237, 237, 0.6), inset 0 -1px #c7c7c7; }
-    GtkSwitch.slider:active {
+    GtkSwitch.slider:active, .list-row:selected GtkSwitch.slider:active {
       border: 1px solid #184472; }
-    GtkSwitch.slider:insensitive {
+    GtkSwitch.slider:insensitive, .list-row:selected GtkSwitch.slider:insensitive {
       border-style: solid;
       color: #8d9091;
       border-color: #a1a1a1;
@@ -1630,7 +1634,7 @@ GtkSwitch {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0); }
-    GtkSwitch.slider:backdrop {
+    GtkSwitch.slider:backdrop, .list-row:selected GtkSwitch.slider:backdrop {
       border-style: solid;
       color: #54595a;
       border-color: #a8a8a8;
@@ -1638,9 +1642,9 @@ GtkSwitch {
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(255, 255, 255, 0); }
-      GtkSwitch.slider:backdrop:active {
+      GtkSwitch.slider:backdrop:active, .list-row:selected GtkSwitch.slider:backdrop:active {
         border-color: #4a90d9; }
-      GtkSwitch.slider:backdrop:insensitive {
+      GtkSwitch.slider:backdrop:insensitive, .list-row:selected GtkSwitch.slider:backdrop:insensitive {
         border-style: solid;
         color: #c7c7c7;
         border-color: #a8a8a8;